
@extends('public.father')

@section('css')
    <link href="/templates/hd/assets/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
    <link href="/templates/hd/assets/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">

    <link href="/templates/hd/assets/css/personal.css" rel="stylesheet" type="text/css">
    <link href="/templates/hd/assets/css/footstyle.css" rel="stylesheet" type="text/css">

@endsection

@section('content')
<div class="nav-table">
    <div class="long-title"><span class="all-goods">全部分类</span></div>
</div>
<b class="line"></b>
<div class="center">
    <div class="col-main">
        <div class="main-wrap">

            <div class="user-foot">
                <!--标题 -->
                <div class="am-cf am-padding">
                    <div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">我的足迹</strong> / <small>Browser&nbsp;History</small></div>
                </div>
                <hr/>

                <!--足迹列表 -->

                @foreach($good as $v)

                <div class="goods">
                    <div class="goods-date" data-date="2015-12-21">
                        <span><i class="month-lite">{{explode('-',$v['created_at'])[0]}}</i>.<i class="day-lite">{{explode('-',$v['created_at'])[1]}}</i><i class="date-desc">{{explode('-',$v['created_at'])[2]}}</i></span>
                        <s class="line"></s>
                    </div>

                    <div class="goods-box first-box">
                        <div class="goods-pic">
                            <div class="goods-pic-box">
                                <a class="goods-pic-link" target="_blank" href="{{route('detail',$v['id'])}}" >
                                    <img src="{{explode(',',$v['pics'])[0]}}" class="goods-img"></a>
                            </div>
                            <a onclick="chu(this,{{$v['id']}})" class="goods-delete" href="javascript:void(0);"><i class="am-icon-trash"></i></a>
                        </div>

                        <div class="goods-attr">
                            <div class="good-title">
                                <a class="title" href="{{route('detail',$v['id'])}}" target="_blank">{{$v['title']}}</a>
                            </div>
                            <div class="goods-price">
										<span class="g_price">
                                        <span>¥</span><strong>{{$v['mallprice']}}</strong>
										</span>
                                <span class="g_price g_price-original">
                                        <span>¥</span><strong>{{$v['goodprice']}}</strong>
										</span>
                            </div>
                            <div class="clear"></div>
                            <div class="goods-num">
                            </div>
                        </div>
                    </div>
                </div>


                @endforeach



                <div class="clear"></div>

                <script>
                    
                    function chu(obj,id) {
                        // alert(123);
                        $.ajax({
                            url:'/chu/'+id,
                            type:'get',
                            success:function (res) {
                                // console.log(res)
                                if (res.volid){
                                    $(obj).parents('.goods').remove()
                                }
                            }
                        })
                    }

                </script>


            </div>
        </div>


    </div>

    @include('public.aside')

</div>
@endsection